home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 099 (1989-05-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 099 (1989-05-15)(Ossowski, Stefan)(DE)(PD).adf / PCQ / Runtime / MathTrans.asm < prev    next >
Assembly Source File  |  1989-03-31  |  3KB  |  192 lines

  1.  
  2. *    MathTrans.asm (of PCQ Pascal runtime library)
  3. *    Copyright (c) 1989 Patrick Quaid
  4.  
  5. *    This file implements the routines found in MathTrans.i
  6. *    The only interesting ones are the opening and closing
  7. *    of the library.
  8.  
  9.     SECTION    MATHTRANS
  10.  
  11.     XREF    _AbsExecBase
  12.     XREF    _LVOOpenLibrary
  13.     XREF    _LVOCloseLibrary
  14.     XREF    _LVORemLibrary
  15.  
  16.     XREF    _LVOSPAsin
  17.     XREF    _LVOSPAcos
  18.     XREF    _LVOSPAtan
  19.     XREF    _LVOSPSin
  20.     XREF    _LVOSPCos
  21.     XREF    _LVOSPTan
  22.     XREF    _LVOSPSincos
  23.     XREF    _LVOSPSinh
  24.     XREF    _LVOSPCosh
  25.     XREF    _LVOSPTanh
  26.     XREF    _LVOSPExp
  27.     XREF    _LVOSPLog
  28.     XREF    _LVOSPLog10
  29.     XREF    _LVOSPPow
  30.     XREF    _LVOSPSqrt
  31.     XREF    _LVOSPTieee
  32.     XREF    _LVOSPFieee
  33.  
  34.  
  35.     XDEF    _OpenMathTrans
  36. _OpenMathTrans
  37.     move.l    #mathtransname,a1
  38.     moveq.l    #0,d0
  39.     move.l    _AbsExecBase,a6
  40.     jsr    _LVOOpenLibrary(a6)
  41.     move.l    d0,_p%MathTransBase
  42.     beq.s    1$
  43.     move.b    #-1,d0
  44. 1$    rts
  45.  
  46.     XDEF    _CloseMathTrans
  47. _CloseMathTrans
  48.     move.l    _p%MathTransBase,a1
  49.     move.l    _AbsExecBase,a6
  50.     jsr    _LVOCloseLibrary(a6)
  51.     move.l    #0,_p%MathTransBase
  52.     rts
  53.  
  54.     XDEF    _FlushMathTrans
  55. _FlushMathTrans
  56.     move.l    _p%MathTransBase,a1
  57.     move.l    a1,d0
  58.     beq.s    1$
  59.     move.l    _AbsExecBase,a6
  60.     jsr    _LVORemLibrary(a6)
  61.     bra    _CloseMathTrans
  62. 1$    rts
  63.  
  64.     XDEF    _SPAsin
  65. _SPAsin
  66.     move.l    4(sp),d0
  67.     move.l    _p%MathTransBase,a6
  68.     jsr    _LVOSPAsin(a6)
  69.     rts
  70.  
  71.     XDEF    _SPAcos
  72. _SPAcos
  73.     move.l    4(sp),d0
  74.     move.l    _p%MathTransBase,a6
  75.     jsr    _LVOSPAcos(a6)
  76.     rts
  77.  
  78.     XDEF    _SPAtan
  79. _SPAtan
  80.     move.l    4(sp),d0
  81.     move.l    _p%MathTransBase,a6
  82.     jsr    _LVOSPAtan(a6)
  83.     rts
  84.  
  85.     XDEF    _SPSin
  86. _SPSin
  87.     move.l    4(sp),d0
  88.     move.l    _p%MathTransBase,a6
  89.     jsr    _LVOSPSin(a6)
  90.     rts
  91.  
  92.     XDEF    _SPCos
  93. _SPCos
  94.     move.l    4(sp),d0
  95.     move.l    _p%MathTransBase,a6
  96.     jsr    _LVOSPCos(a6)
  97.     rts
  98.  
  99.     XDEF    _SPTan
  100. _SPTan
  101.     move.l    4(sp),d0
  102.     move.l    _p%MathTransBase,a6
  103.     jsr    _LVOSPTan(a6)
  104.     rts
  105.  
  106.     XDEF    _SPSincos
  107. _SPSincos
  108.     move.l    8(sp),d1
  109.     move.l    4(sp),d0
  110.     move.l    _p%MathTransBase,a6
  111.     jsr    _LVOSPSincos(a6)
  112.     rts
  113.  
  114.     XDEF    _SPSinh
  115. _SPSinh
  116.     move.l    4(sp),d0
  117.     move.l    _p%MathTransBase,a6
  118.     jsr    _LVOSPSinh(a6)
  119.     rts
  120.  
  121.     XDEF    _SPCosh
  122. _SPCosh
  123.     move.l    4(sp),d0
  124.     move.l    _p%MathTransBase,a6
  125.     jsr    _LVOSPCosh(a6)
  126.     rts
  127.  
  128.     XDEF    _SPTanh
  129. _SPTanh
  130.     move.l    4(sp),d0
  131.     move.l    _p%MathTransBase,a6
  132.     jsr    _LVOSPTanh(a6)
  133.     rts
  134.  
  135.     XDEF    _SPExp
  136. _SPExp
  137.     move.l    4(sp),d0
  138.     move.l    _p%MathTransBase,a6
  139.     jsr    _LVOSPExp(a6)
  140.     rts
  141.  
  142.      XDEF    _SPLog
  143. _SPLog
  144.     move.l    4(sp),d0
  145.     move.l    _p%MathTransBase,a6
  146.     jsr    _LVOSPLog(a6)
  147.     rts
  148.  
  149.     XDEF    _SPLog10
  150. _SPLog10
  151.     move.l    4(sp),d0
  152.     move.l    _p%MathTransBase,a6
  153.     jsr    _LVOSPLog10(a6)
  154.     rts
  155.  
  156.     XDEF    _SPPow
  157. _SPPow
  158.     move.l    8(sp),d1
  159.     move.l    4(sp),d0
  160.     move.l    _p%MathTransBase,a6
  161.     jsr    _LVOSPPow(a6)
  162.     rts
  163.  
  164.     XDEF    _SPSqrt
  165. _SPSqrt
  166.     move.l    4(sp),d0
  167.     move.l    _p%MathTransBase,a6
  168.     jsr    _LVOSPSqrt(a6)
  169.     rts
  170.  
  171.     XDEF    _SPTieee
  172. _SPTieee
  173.     move.l    4(sp),d0
  174.     move.l    _p%MathTransBase,a6
  175.     jsr    _LVOSPTieee(a6)
  176.     rts
  177.  
  178.     XDEF    _SPFieee
  179. _SPFieee
  180.     move.l    4(sp),d0
  181.     move.l    _p%MathTransBase,a6
  182.     jsr    _LVOSPFieee(a6)
  183.     rts
  184.  
  185.     SECTION    MTB,DATA
  186.  
  187. _p%MathTransBase    dc.l    0
  188. mathtransname    dc.b    'mathtrans.library',0
  189.  
  190.     END
  191.  
  192.